﻿[#include "/app/common/layout/__backstagemainlayout.html"/]
[@mainlayout pageJavascript=pageJavascript pageCss=pageCss currentMenu="typeFlag-rootTaskFlag"]
<div class="page-header">
	<h1>
		<a href="${ContextPath}/admin/type">类型管理</a>
		<small> <i class="ace-icon fa fa-angle-double-right"></i> 任务分配-1级</small>
	</h1>
</div>
	<table class="table table-bordered table-hover">
		<thead>
			<tr>
				<th width="2%">序号</th>
				<th width="3%">名称</th>
				<th width="15%">类型</th>
				<th width="4%">操作</th>
			</tr>
		</thead>

		<tbody>
			[#list rootApartmentList as apartment]
			<tr>
				<td>${apartment_index+1}</td>
				<td>${apartment.name}</td>
				
				<form class="form-horizontal" role="form" action="${ContextPath}/admin/task/rootAssign" method="post" >
				<input type="hidden" name="id" value="${(apartment.id)}">
				<td>
					[#list typeList as type]
						
						<input type="checkbox" id="inlineCheckbox1" name="types" value="${(type.id)!}"
							[#list apartment.remark as t]
								[#if t.id=type.id]
								checked 
								[/#if]
							[/#list]
						> ${(type.name)!}

					[/#list]
				
				</td>
				<td>
					<div class="action-buttons">
						<button value="提交" type="submit" class="btn btn-minier btn-primary btn-xs " data-loading-text="正在提交...">提交</button>
						<a class="btn btn-minier btn-primary btn-xs "   href="${ContextPath}/admin/task/childTask?id=${(apartment.id)!}">分配</a>
					</div>
				</td>
				</form>
			</tr>
			[/#list]
			[#if rootApartmentList.size()!=10]
			[#assign size=(10-rootApartmentList.size())]
				[#list 1..size as t]
					<tr>
						<td>${(rootApartmentList.size()+t)!}</td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
				[/#list]
			[/#if]
		</tbody>
		
		<tfoot>
			<tr></tr>
			<tr></tr>
			<tr></tr>
			<tr></tr>
		</tfoot>
	</table>
	
[/@mainlayout]